package com.xinmao.quantitative.utils;

import com.xinmao.quantitative.enums.MarketEnum;

public class StockUtil {



    public static String getStockCode(String symbol) {

        if (symbol.startsWith(MarketEnum.SH.getType())) {
            return MarketEnum.SH.getCode() + symbol;
        } else if (symbol.startsWith(MarketEnum.SZ.getType())) {
            return MarketEnum.SZ.getCode() + symbol;
        }else if (symbol.startsWith(MarketEnum.BJ.getType())) {
            return MarketEnum.BJ.getCode() + symbol;
        }
        return symbol;
    }
}
